BUILD=build
GENDATA=gendata
STANDARD=standard
TEST=test
TESTCASES= 1 2 3 4 5 6 7 8 9 10
OBJECTS= $(STANDARD)
CFLAGS = -g -Wall -Wno-unused-result -O3
CC=cc

$(BUILD): $(OBJECTS)

$(GENDATA): src/gendata.py $(OBJECTS)
	for i in $(TESTCASES); do \
		python3 src/gendata.py > data/data$$i.in; \
		bin/standard < data/data$$i.in > data/data$$i.out; \
	done

$(STANDARD): src/standard.c
	$(CC) $(CFLAGS) src/standard.c -o bin/standard

.PHONY: clean

clean:
	-rm bin/standard
	-rm -rfv bin/standard.dSYM
